﻿using BCCommon;
using BCCommon.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCDto.Sim.Admin.TreePermission
{
    /// <summary>
    /// 页面权限配置
    /// </summary>
    public class TreePermissionConfigRequestDto
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        [Display(Name ="权限名称")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public string PermissionName { get; set; }
        /// <summary>
        /// 权限码
        /// </summary>
        [Display(Name ="权限码")]
        [Required(ErrorMessage = "{0} 为必填项")]
        [RegularExpression(RegexPatterns.ENGLISH_AND_UNDERLINE, ErrorMessage = "{0} 权限码仅支持英文字符与下划线")]
        public string PermissionCode { get; set; }
        /// <summary>
        /// 权限路径码
        /// </summary>
        [Display(Name ="权限路径码")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public string PermissionPathCode { get; set; }

        /// <summary>
        /// 权限类型
        /// </summary>
        [Display(Name ="权限类型")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public PermissionType PermissionType { get; set; }

        /// <summary>
        /// 权限顺序
        /// </summary>
        [Display(Name ="权限顺序")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public int PermissionOrder { get; set; }
        /// <summary>
        /// 是否显示
        /// </summary>
        [Display(Name ="是否显示")]
        [Required(ErrorMessage = "{0} 为必选项")]
        public bool IsShow { get; set; }

        /// <summary>
        /// 页面路径
        /// </summary>
        [Display(Name ="页面路径")]
        public string PagePathCode { get; set; }
        /// <summary>
        /// 菜单图标
        /// </summary>
        [Display(Name ="菜单图标")]
        public string Icon { get; set; }
    }
}
